<template>
    <div class="app">
        <div class="shou" v-show="val === 0">
            <div class="head">
                <img :src="tit">
            </div>
            <div class="titl">
                <img :src="titb" alt="">
            </div>
            <div class="btn" v-for="(value,index) in btn" :key="index" @click="val = index+1">
                <a href="###">
                    {{value}}
                </a>
            </div>
        </div>
        <Ta v-show="val === 1" @change="change" :tit='tit' :val='val'></Ta>
    </div>
</template>
<script>
import Ta from './Ta'
export default {
    components:{Ta},
    data(){
        return {
            tit:require('@/assets/tit.png'),
            titb:require('@/assets/titb.png'),
            btn:['中国共产党章程','中国共产党廉洁自律准则'],
            time:null,
            val:0,
        }
    },
    methods:{
        change(index){
            this.val=index;
        }
    }
}
</script>
<style>
*{margin: 0;padding: 0;}
li{list-style: none;}
a{text-decoration: none;}
.app{
    width: 640px;
    height: 1000px;
    margin: 0 auto;
    background: url('../../assets/bg.png')no-repeat;
    background-size: 100% 100%;
    overflow: hidden;
}
.shou{
    width: 100%;
    height: 100%;
}
.head{
    width: 100%;
    height: 124px;
    margin-top: 164px;
}
.head>img{
    width: 100%;
    height: 122px;
}
.titl{
    width: 100%;
    height: 35px;
    margin: 60px 0 50px;
}
.titl>img{
    width: 100%;
    height: 33px;
}
.btn{
    width: 493px;
    height: 106px;
    margin: 0 auto 8px;
}
.btn>a{
    display: block;
    width: 100%;
    height: 100%;
    background: url('../../assets/btn_bg.png')no-repeat;
    background-size: 100% 100%;
    text-align: center;
    line-height: 96px;
    color: #fff;
    font-size: 30px;
}
</style>